Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Application-Defined Functions


Progress Functions

Compressors and decompressors call progress functions to report on their progress in the current operation. When a component calls your progress function, it supplies you with a number that indicates the completion percentage. This fixed-point value may range from 0.0 through 1.0. Your program can cause the component to terminate the current operation by returning a result code of codecAbortErr.

The Image Compression Manager calls your progress function only during long operations, and it does not call your function more than 30 times per second.

The ProgressProcPtr data type defines a pointer to a progress function. You assign a progress function to an image or a sequence by passing a pointer to a structure that identifies the progress function to the appropriate function.

/* progress function structure */
typedef struct ProgressProcRecord ProgressProcRecord; 
typedef ProgressProcRecord *ProgressProcRecordPtr;
The progress function structure contains the following fields:

struct ProgressProcRecord 
{
   ProgressProcPtr progressProc; /* ptr to progress function */
   long           progressRefCon;/* reference constant */
};
Field Description
progressProc
Contains a pointer to your progress function.
progressRefCon

Contains a reference constant for use by your progress function.

Subtopics
MyProgressProc

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996